<template>
	<view class="button-primary" :class="plain ? 'button-plain':''" @click="btnClick">
		{{title}}
	</view>
</template>

<script>
	export default {
		name:"XButton",
		props: {
			title: {
				type: String,
				default () {
					return ''
				}
			},
			
			plain: {
				type: Boolean,
				default () {
					return false
				}
			}
		},
		data() {
			return {
				
			};
		},
		methods: {
			btnClick() {
				this.$emit('click');
			}
		}
	}
</script>

<style lang="scss">

	.button-primary{
		width: 300rpx;
		height: 88rpx;
		background: linear-gradient(0deg, #F5AC3C 0%, #AACD22 100%);
		border-radius: 44rpx;
		
		display: flex;
		justify-content: center;
		align-items: center;
		
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
	}

	.button-plain{
		width: 300rpx;
		height: 88rpx;
		background: #FFFFFF;
		border: 1rpx solid #6E645A;
		border-radius: 44rpx;
		
		display: flex;
		justify-content: center;
		align-items: center;
		
		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #6E645A;
	}
</style>
